<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>主页面</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="layui/css/layui.css" media="all">
    <link rel="stylesheet" href="css/phone-main.css" media="all">
</head>

<body>
<div class="layui-main-bg"></div>
<div class="layui-fluid head_fluid">
    <div class="layui-row" style="background-color: #C2C7D3;margin-top: 0">
        <div class="layui-col-md12 layui-col-xs12" style="text-align: right;">
            你好！欢迎访问办公管理系统！|
            <a href="login.html" style="color: orangered;margin-right: 10px">退出</a>
        </div>
    </div>
</div>

<div class="layui-container" id="app">
    <div class="same">
        <div class="layui-row row_same">
            <div class="layui-col-md12 layui-col-xs12">
                <p align="left">信息管理</p>
            </div>
        </div>
        <div class="layui-row row_fun">
            <div class="layui-col-md4 layui-col-xs3">
                <div>
                    <a href="personal-show.html" target="_self">
                        <i class="layui-icon layui-icon-user p_icon"></i>
                        <div class="fun">个人信息</div>
                    </a>
                </div>
            </div>
            <!--<div class="layui-col-md4 layui-col-xs3">-->
                <!--<div>-->
                    <!--<a href="error.html" target="_self">-->
                        <!--<i class="layui-icon layui-icon-reply-fill reply_icon"></i>-->
                        <!--<div class="fun">好友消息</div>-->
                    <!--</a>-->
                <!--</div>-->
            <!--</div>-->
            <div class="layui-col-md4 layui-col-xs3">
                <div>
                    <a href="error.html" target="_self">
                        <i class="layui-icon layui-icon-notice notice_icon"></i>
                        <div class="fun">系统消息</div>
                    </a>
                </div>
            </div>
        </div>


    </div>

    <div class="same">
        <div class="layui-row row_same">
            <div class="layui-col-md12 layui-col-xs12">
                <p align="left">邮箱管理</p>
            </div>
        </div>
        <div class="layui-row row_fun">
            <div class="layui-col-md4 layui-col-xs3">
                <div>
                    <a href="sendMail.html" target="_self">
                        <i class="layui-icon layui-icon-release icon"></i>
                        <div class="fun">写邮件</div>
                    </a>
                </div>
            </div>
            <div class="layui-col-md4 layui-col-xs3">
                <div>
                    <a href="inbox.html" target="_self">
                        <i class="layui-icon layui-icon-email send_icon"></i>
                        <div class="fun">收件箱</div>
                    </a>
                </div>
            </div>
            <div class="layui-col-md4 layui-col-xs3">
                <div>
                    <a href="spam.html" target="_self">
                        <i class="layui-icon layui-icon-delete del_icon"></i>
                        <div class="fun">垃圾邮件</div>
                    </a>
                </div>
            </div>
        </div>


    </div>

    <div class="same">
        <div class="layui-row row_same">
            <div class="layui-col-md12 layui-col-xs12">
                <p align="left">考勤管理</p>
            </div>
        </div>
        <div class="layui-row row_fun">
            <div class="layui-col-md4 layui-col-xs3">
                <div>
                    <a href="hitCard.html" target="_self">
                        <i class="layui-icon layui-icon-ok da_icon"></i>
                        <div class="fun">打卡</div>
                    </a>
                </div>
            </div>
            <div class="layui-col-md4 layui-col-xs3">
                <div>
                    <a href="hitCard-record.html" target="_self">
                        <i class="layui-icon layui-icon-log record_icon"></i>
                        <div class="fun">打卡记录</div>
                    </a>
                </div>
            </div>
            <div class="layui-col-md4 layui-col-xs3">
                <div>
                    <a href="punch.html" target="_self">
                        <i class="layui-icon layui-icon-tree xiu_icon"></i>
                        <div class="fun">休假</div>
                    </a>
                </div>
            </div>
            <div class="layui-col-md4 layui-col-xs3" v-if="userInfo.role === 1">
                <div>
                    <a href="error.html" target="_self">
                        <i class="layui-icon layui-icon-tree my_icon"></i>
                        <div class="fun">我的休假</div>
                    </a>
                </div>
            </div>
            <div class="layui-col-md4 layui-col-xs3" v-else>
                <div>
                    <a href="punch-record.html" target="_self">
                        <i class="layui-icon layui-icon-tree my_icon"></i>
                        <div class="fun">休假管理</div>
                    </a>
                </div>
            </div>
        </div>
    </div>

    <div class="same">
        <div class="layui-row row_same">
            <div class="layui-col-md12 layui-col-xs12">
                <p align="left">权限管理</p>
            </div>
        </div>
        <div class="layui-row row_fun">
            <div class="layui-col-md4 layui-col-xs3">
                <div>
                    <a href="personal-edit.html" target="_self">
                        <i class="layui-icon layui-icon-edit" style="font-size: 40px;color: grey"></i>
                        <div class="fun">修改信息</div>
                    </a>
                </div>
            </div>
            <div class="layui-col-md4 layui-col-xs3" v-if="userInfo.role === 0">
                <div>
                    <a href="admin.html" target="_self">
                        <i class="layui-icon layui-icon-set g_icon"></i>
                        <div class="fun">管理账户</div>
                    </a>
                </div>
            </div>
            <div class="layui-col-md4 layui-col-xs3" v-if="userInfo.role === 0">
                <div>
                    <a href="admin.html" target="_self">
                        <i class="layui-icon layui-icon-survey g_icon"></i>
                        <div class="fun">发布公告</div>
                    </a>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script type="text/javascript" src="js/jquery1.9.1.js"></script>
<script type="text/javascript" src="layui/layui.js"></script>
<script type="text/javascript" src="js/vue.js"></script>
<script type="text/javascript" src="js/common.js"></script>
<script>
    var app = new Vue({
        el: "#app",
        data: {
            userInfo: {},
        },
        methods: {},
        mounted() {
            const that = this;
            $.ajax({
                url: "../user/" + parseInt(Base64.decode(getToken())),
                success: function (data) {
                    that.userInfo = data.obj;
                }
            });
        }
    });
</script>

</html>
